<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/3
 * Time: 13:11
 */

namespace app\modules\backed\controllers;


/**
 *
 * 后台登录基本控制器
 */
use yii\web\Controller;

class BaseController extends Controller
{
    public $layout="backed";
    public function __construct($id, $module, $config = [])
    {
        parent::__construct($id, $module, $config = []);
        $session =  \Yii::$app->session;
        if (!$session->isActive) {
           return $this->redirect('login/index');
        }
        if(!$session->get('account_id')){
            return $this->redirect('login/index');
        }
   }


}